home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks95 / Aaron 1.0b3.sit / Aaron 1.0b3 / Aaron Source / CDEF and Patches / CDEF.h < prev    next >
Text File  |  1995-06-24  |  2KB  |  75 lines

  1. #define    ButtonSize    12
  2. #define ButtonLeft    2
  3. #define TitleGap    4
  4.  
  5. #define AddrMask    0x7FFFFFFF
  6.  
  7. #define inNone        0
  8.  
  9. #define Radius        8
  10.  
  11. #define OUTLINE_THICKNESS    3
  12. #define OUTLINE_INSET        (OUTLINE_THICKNESS + 1)
  13. #define OUTLINE_OUTSET        (-OUTLINE_INSET)
  14. #define CURVE_ADJUSTMENT    6
  15.  
  16. enum {
  17.     cTingeLight = 13,
  18.     cTingeDark    = 14
  19. };
  20.  
  21. enum {
  22.     iFrameLight = 0,
  23.     iHiliteLight = 0,
  24.     iEmbossed,
  25.     iBodyColor,
  26.     iHiliteDark,
  27.     iFrameDark,
  28.     iFrameColor,
  29.     iTextColor,
  30.     iTingeLight,
  31.     iTingeDark
  32. };
  33.  
  34. typedef struct GrEG **GrEGHandle;
  35. struct GrEG {
  36.     short    markStyle[2];
  37.     short    textStyle;
  38.     short    buttonStyle;
  39.     long    reserved;
  40. };
  41.  
  42. typedef    struct {
  43.             ControlHandle    theControl;
  44.             long            msgParam;
  45.             Boolean            inActive;
  46.             Boolean            pushed;
  47.             Boolean            pushButton;
  48.             Boolean            radio;
  49.             Boolean            useSysFont;
  50.             Boolean            newFolder;
  51.             GrEGHandle        prefs;
  52.             Rect            theRect;
  53.             RGBColor        theColors[9];
  54.             Boolean            useTinges;
  55.         }    GregInfo;
  56.  
  57. pascal long NewFolder ( short varCode, ControlHandle theControl, short msgCode, long msgParam );
  58. // Entry point for the New Folder CDEF
  59.  
  60. pascal long Buttons ( short varCode, ControlHandle theControl, short msgCode, long msgParam );
  61. // Entry point for the standard button CDEF
  62.  
  63. pascal long CDEF ( short varCode, ControlHandle theControl, short msgCode, long msgParam, Boolean newFolder );
  64.  
  65. pascal void DrawButton ( short, short, GDHandle, GregInfo * );
  66. pascal void DrawIcon ( short, short, GDHandle, GregInfo * );
  67.  
  68. void DrawTitle    ( GregInfo *, Boolean, Boolean, Boolean );
  69.  
  70. Boolean UseTinges ( RGBColor[] );
  71. void GetPartColor ( CTabPtr theTable, RGBColor *theColor, short part );
  72. void GetRGBColor ( CCTabHandle theTable, RGBColor *theColor, short backPart, short forePart, short shade);
  73. void PrepareColors ( ControlHandle, RGBColor[] );
  74. void DoDraw1 ( GregInfo *theInfo, CGrafPtr savePort, CGrafPtr myPort, Boolean onScreen );
  75. void DoDraw ( GregInfo *theInfo );